package com.zr.lads.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.zr.lads.dao.LoginDao;
import com.zr.lads.pojo.User;
import com.zr.lads.service.LoginService;

/**
 * 登录服务实现类
 * @author tang
 *
 */
@Repository(value="loginService")
public class LoginServiceImpl implements LoginService {

	@Resource
	private LoginDao<User> loginDao;
	
	@Override
	public User isExistUser(String account, String password) {
		String hql = "from User where UAccount=? and UPassword=?";
		Object[] param = new Object[]{account,password}; 
		User u = loginDao.get(hql, param);
		return u;
	}

}
